<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>open方法</title>
    <script>
        function f1(){
            window.open();
        }
        function f2(){
            open("37-事件冒泡.html");
        }
        function f3(){
            // 特征:
            // 属性名=属性值,属性名=属性值
            open("37-事件冒泡.html","aaa","width=300px,height=200px")
        }
        function f4(){
            let s = setInterval(function(){
                open("37-事件冒泡.html","aaa","width=300px,height=200px");
            },200);
            setTimeout(function(){
                clearInterval(s);
            },5000);
        }
        function f5(){
            let win = open("37-事件冒泡.html","aaa","width=300px,height=200px");
            setTimeout(function(){
                win.close();
            },3000);
        }
        function f6(){
            open("42-地址栏.html","aaa","width=300px,height=200px")
        }
    </script>
</head>
<body>
<button onclick="f1()">打开新窗口</button><br>
<button onclick="f2()">打开指定页面的窗口</button><br>
<button onclick="f3()">打开指定页面的小窗口</button><br>
<button onclick="f4()">周期性打开小窗口</button><br>
<button onclick="f5()">打开小窗口3秒后关闭</button><br>
<button onclick="f6()">打开42的页面</button><br>
</body>
</html>